package threaddemo;

public class ThreadTwo extends  Thread{

    public  void run(){
        //通过重写run方法达到线程的业务逻辑处理的目的
        for (int i = 0 ; i<20 ; i++)
        {
            System.out.println("Thread two:"+i);
            //休眠1s
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

}
